<template>
	<view :class="currentTheme">
		<a-nabbar name="详细信息" />
		<view class="u-padding-32">
			<item-box :padding="0">
				<label-box label="意向剧本" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.productName || ''}}</view>
				</label-box>
				<label-box label="提交时间" labelWidth="130" labelSize="32"  border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.createTime | timeFormat}}</view>
				</label-box>
				<label-box label="门店名" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.storeName || ''}}</view>
				</label-box>
				<label-box label="所在城市" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.cityPath | cityPathFormat}}</view>
				</label-box>
				<label-box label="微信号" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.wxId || ''}}</view>
				</label-box>
				<label-box label="联系人" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.contactMan || ''}}</view>
				</label-box>
				<label-box label="联系电话" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.contactNumber || ''}}</view>
				</label-box>
				<label-box label="门店数量" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.storeNumber || ''}}</view>
				</label-box>
				<label-box label="经营年数" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.businessYear || ''}}</view>
				</label-box>
				<label-box label="一城多限" labelWidth="130" labelSize="32" paddinglr="40"  v-if="form.issueModeName==='城限'" paddingTb="32" labelPosition="center">
					<view class="u-font-30 text-order-time">{{!form.oneCityMultilimit?'不':''}}接受</view>
				</label-box>
			</item-box>
			<view class="box-title u-padding-top-20  u-padding-bottom-20 u-font-32 text-bold">收货信息</view>
			<item-box padding="0">
				<label-box label="姓名" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.contactMan || ''}}</view>
				</label-box>
				<label-box label="电话" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.contactNumber || ''}}</view>
				</label-box>
				<label-box label="收货地址" labelWidth="130" labelSize="32" border paddingTb="32" labelPosition="center" paddinglr="40">
					<view class="u-font-30 text-order-time">{{form.detailAddress | cityPathFormat}}</view>
				</label-box>
			</item-box>
			<view class="u-margin-top-50 u-margin-bottom-50" v-if="option.icon!='wodeyixiang'">
				<item-btn width="100%" height="88" @click="clip">复制收货信息</item-btn>
				<view class="u-padding-top-20 u-padding-bottom-30">
					<item-btn width="100%" height="88" type="plain" @click="singChat">私聊TA</item-btn>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {getDetail} from '@/api/crud.js'
	export default {
		data() {
			return {
				option:{},
				apiType:"userIntention",
				apiModule:'shopApi',
				form:{}
			};
		},
		onLoad(option) {
			this.option = option;
		},
		onShow() {
			getDetail('',this.apiType,this.apiModule,this.option.id).then(res=>{
				this.form = res;
			})
		},
		methods: {
			setting() {
				const {id,productId ,driveCarId,oneCityMultilimit} = this.form
				this.$u.route({
					url:'/pagesA/want/setting',
					params:{
						id,productId ,driveCarId,oneCityMultilimit:oneCityMultilimit?1:0
					}
				})
			},
			clip(){
				const {detailAddress,contactNumber ,contactMan,cityName} = this.form
				uni.setClipboardData({
					data: `收货人: ${contactMan}
					手机号码: ${contactNumber}
					所在地区: ${cityName}
					详细地址: ${detailAddress}`
				});
			},
			singChat(){
				this.$u.route({
					url:'/pages/chat/chat',
					params:{
						type:'singleChat',
						name:this.form.nickname,
						id:this.form.hxUsername
					}
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
.text-order-time{
	line-height:70rpx
}
</style>
